home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
LANG
/
BASIC
/
LIB
/
EVENTSHELL
/
DOCS
/
Windows
< prev
Wrap
Text File
|
1996-05-05
|
15KB
|
625 lines
FNshell_WindowSetSpriteArea()
=> int window handle
int address of sprite area
<= int window handle
--------------------------------------------------------
PROCshell_OpenWindow()
=> int window handle
int full flag
int front flag
Any panes attached to the window with
PROCshell_AttachPane will be opened
automatically.
--------------------------------------------------------
PROCshell_CloseWindow()
=> int window handle
Any panes attached to the window with
PROCshell_AttachPane will be closed
automatically.
--------------------------------------------------------
FNshell_MessageWindow()
=> str message text
int cancel flag
str program name
str header
<= int result
This routine is useful for OK to quit type
windows. The returned result is 1 if OK
was clicked, 2 if Cancel was selected.
Cancel Flag
FALSE = don't display a CANCEL icon
TRUE = message window has a CANCEL icon
Program Name
Displayed in the title bar of the
message window. If "" then FNshell_GetAppName
is called to find the name of the running
application
Header
When null then the title bar will read
"Message from AppName". When non-null
the header is displayed instead
--------------------------------------------------------
PROCshell_WindowMoveTo()
=> int window handle to move
int x coord to move to
int y coord to move to
See also PROCshell_WindowMoveToIcon.
--------------------------------------------------------
PROCshell_WindowMoveToIcon()
=> int window handle to move
int window handle containing icon
int icon handle
int x offset of moved window from icon
int y offset of moved window from icon
A problem can occur with this call if RISC OS
2 is in use. As it does not seem possible to
discover the scroll offsets of the iconbar the
window may nove to the wrong position. Any
suggestions would be gratefully received...
See also PROCshell_WindowMoveTo.
--------------------------------------------------------
PROCshell_WindowCentreOnScreen()
=> int window handle to move
Centres a window on the screen, checking
the actual size of the screen first.
--------------------------------------------------------
PROCshell_WindowCentreOnPointer()
=> int window handle to move
This routine attempts to centre the
window on the current pointer position.
It may fail to do so if the pointer is
too close to the edge of the desktop
and windows are not allowed to move
outside the desktop.
This routine is useful in the 'PreOpen'
function of a static dialog box. Dynamic
dialog boxes are automatically centred
on the pointer.
See also PROCshell_WindowMoveTo.
--------------------------------------------------------
PROCshell_CreateWindow()
=> str window identifier
int window handle (ignored on entry)
<= int window handle of newly created window
--------------------------------------------------------
PROCshell_OpenWindowStatic()
=> int window handle
The window will be brought to the top
of the stack by this call. The window
must have been created with a call to
PROCshell_CreateWindowStatic - an error
will be generated if this is not the
case.
Any panes attached to the window with
PROCshell_AttachPane will be opened
automatically.
--------------------------------------------------------
PROCshell_CreateWindowStatic()
=> str window identifier
int window handle (ignored on entry)
<= int window handle of newly created window
--------------------------------------------------------
PROCshell_WindowRetitle()
=> int window handle (may be altered,
new value returned)
str new title
The window handle may be changed by this
routine, be sure to use the value returned
when referring to the window in the future.
It is not necessary to make the window title
indirected.
--------------------------------------------------------
PROCshell_WindowSetTitleRightJust()
=> int window handle (may be altered,
new value returned)
--------------------------------------------------------
PROCshell_WindowSetTitleCentreJust
=> int window handle (may be altered,
new value returned)
--------------------------------------------------------
PROCshell_WindowResize()
=>
int window handle
int min x coord of workarea
int min y coord of workarea
int max x coord of workarea
int max y coord of workarea
bool open flag
--------------------------------------------------------
PROCshell_WindowBringToTop()
=> int window handle to bring to top
This routine causes a wimp message to be sent to
bring a window to the top.
It may take several wimp poll events before the
window is opened, however, so you cannot assume
it is actually open immediately after this call.
You can use FNshell_WindowIsOnTop to check the
status of the window after this call.
--------------------------------------------------------
FNshell_WindowIsOnTop()
=> int window handle
<= bool TRUE if window is on top, otherwise
FALSE
This function can be used to discover if the given
window is on top of the stack (i.e. completely
uncovered). It is especially useful after a call
to PROCshell_WindowBringToTop as it may take
several calls to Wimp_Poll before the window is
brought to the top. The window may belong to another
task.
--------------------------------------------------------
FNshell_WindowHasTitleBar()
=> int window handle
<= bool TRUE if window has a title bar, otherwise
FALSE
--------------------------------------------------------
FNshell_WindowGetTitle()
=> int window handle
<= str window title (null if no title)
--------------------------------------------------------
FNshell_WindowTitleBufferLength()
=> int window handle
<= int buffer length (12 if title is not
indirected)
--------------------------------------------------------
FNshell_WindowIsMoveable()
=> int window handle
<= bool TRUE if window is moveable, otherwise
FALSE
--------------------------------------------------------
FNshell_WindowIsAPane()
=> int window handle
<= bool TRUE if window is a pane, otherwise
FALSE
--------------------------------------------------------
FNshell_WindowIsNotBounded()
=> int window handle
<= bool TRUE if window may move outside
the screen area, otherwise FALSE
--------------------------------------------------------
FNshell_WindowTrapsHotKeys()
=> int window handle
<= bool TRUE if window traps hot keys,
otherwise FALSE
--------------------------------------------------------
FNshell_WindowHasBeenToggled()
=> int window handle
<= bool TRUE if window has been toggled to
full size, otherwise FALSE
--------------------------------------------------------
FNshell_WindowHasInputFocus()
=> int window handle
<= bool TRUE if window has the input focus,
otherwise FALSE
--------------------------------------------------------
FNshell_WindowHasBackIcon()
=> int window handle
<= bool TRUE if window has a send to back icon,
otherwise FALSE
--------------------------------------------------------
FNshell_WindowHasCloseIcon()
=> int window handle
<= bool TRUE if window has a close icon,
otherwise FALSE
--------------------------------------------------------
FNshell_WindowHasToggleIcon()
=> int window handle
<= bool TRUE if window has a toggle icon,
otherwise FALSE
--------------------------------------------------------
FNshell_WindowHasVScrollBar()
=> int window handle
<= bool TRUE if window has a vertical scroll bar,
otherwise FALSE
--------------------------------------------------------
FNshell_WindowHasHScrollBar()
=> int window handle
<= bool TRUE if window has a horizontal scroll bar,
otherwise FALSE
--------------------------------------------------------
FNshell_WindowHasAdjustSizeIcon()
=> int window handle
<= bool TRUE if window has an adjust size icon,
otherwise FALSE
--------------------------------------------------------
FNshell_WindowIsOpen()
=> int window handle
<= bool TRUE if window is open, otherwise
FALSE
--------------------------------------------------------
PROCshell_WindowToggleBackIcon()
=> int window handle
<= int updated window handle
Adds a 'Back icon' to a window if it doesn't
have one, removes it if it does. Also redisplays
window in its new state if it is open.
--------------------------------------------------------
PROCshell_WindowToggleCloseIcon()
=> int window handle
<= int updated window handle
Adds a 'Close icon' to a window if it doesn't
have one, removes it if it does. Also redisplays
window in its new state if it is open.
--------------------------------------------------------
PROCshell_WindowToggleTitleBar()
=> int window handle
<= int updated window handle
Adds a Title bar to a window if it doesn't one,
removes it if it does. Also redisplays window
in its new state if it is open.
--------------------------------------------------------
PROCshell_WindowToggleToggleIcon()
=> int window handle
<= int updated window handle
Adds a 'Toggle size icon' to a window if it
doesn't one, removes it if it does. Also
redisplays window in its new state if it is
open.
--------------------------------------------------------
PROCshell_WindowToggleVScrollBar()
=> int window handle
<= int updated window handle
Adds a vertical scroll bar to a window if
it doesn't one, removes it if it does. Also
redisplays window in its new state if it is
open.
--------------------------------------------------------
PROCshell_WindowToggleAdjustSizeicon()
=> int window handle
<= int updated window handle
Adds a 'Adjust size icon' to a window if it
doesn't one, removes it if it does. Also
redisplays window in its new state if it is
open.
--------------------------------------------------------
PROCshell_WindowToggleHScrollBar()
=> int window handle
<= int updated window handle
Adds a horizontal scroll bar to a window if
it doesn't one, removes it if it does. Also
redisplays window in its new state if it is
open.
--------------------------------------------------------
FNshell_WindowLoaded()
=> str window name (max 11 characters)
<= bool TRUE if template is loaded, otherwise
FALSE
--------------------------------------------------------
FNshell_WindowCountIcons()
=> int window handle
<= int number of icons present in the
window (including those created
after the window)
This function can be used to discover the buffer
size required for a call to Wimp_GetWindowInfo.
--------------------------------------------------------
PROCshell_OpenWindowDynamic()
=> str window identifier name
str pre-open function
(optional, may be "")
str post-open function
(optional, may be "")
Clicking outside the window or pressing
<ESC> will close the window (the
window is opened as a menu in fact).
Any panes attached to the window with
PROCshell_AttachPane will be opened
automatically.
Note that menus cannot be attached to
dynamic windows as the mouse click
would close it!
User PreOpen FN (PROCshell_OpenWindowDynamic)
=> int window handle
<= int ignore
User PostOpen FN (PROCshell_OpenWindowDynamic)
=> int window handle
<= int ignore
--------------------------------------------------------
PROCshell_WindowSetForegroundColour()
=> int window handle
int wimp colour number
This routine may update the window handle
--------------------------------------------------------
PROCshell_WindowSetBackgroundColour()
=> int window handle
int wimp colour number
This routine may update the window handle
--------------------------------------------------------
PROCshell_WindowScrollTo()
=> int window handle
int x scroll offset
int y scroll offset
Sets the scroll offsets for the specified
window to the new scroll offsets. If the window
is closed it is not opened by this call.
--------------------------------------------------------
PROCshell_WindowScrollBy()
=> int window handle
int x scroll offset to add
int y scroll offset to add
Adds the specified scroll offsets to the current ones,
effectively forcing the window to scroll by the given
amounts. Useful for auto scrolling a window while dragging
a selection.
If the window is closed it is not opened by this call.
--------------------------------------------------------
PROCshell_WindowSendToBack()
=> int window handle to send to back
This routine causes a wimp message to be sent to
send a window behind all the others on the screen.
It may take several wimp poll events before the
window is opened, however, so you cannot assume
it is actually open immediately after this call.
--------------------------------------------------------
FNshell_WindowGetTopPaneDepth()
=> int window handle
<= int depth of pane in OS units (0 if no pane
attached)
--------------------------------------------------------
FNshell_WindowGetBottomPaneDepth()
=> int window handle
<= int depth of pane in OS units (0 if no pane
attached)
--------------------------------------------------------
PROCshell_WindowGetPosition()
=> int window handle
int min x coord (OS units) updated on return
int min y coord (OS units) updated on return
int max x coord (OS units) updated on return
int max y coord (OS units) updated on return
Returns the position of the window relative to the bottom
left of the screen
--------------------------------------------------------
PROCshell_WindowGetCentre()
=> int window handle
int x coord (OS units) updated on return
int y coord (OS units) updated on return
Returns the centre of the window's visible area relative
to the bottom left of the screen
--------------------------------------------------------
FNshell_DeleteWindow()
=> int window handle
Destroys the specified window, removing it from the
screen and updating internal references stored by
EvntShell
--------------------------------------------------------
PROCshell_WindowUserRedrawGetLines()
=> int address of window redraw block returned
by wimp
int line spacing (OS units)
int top margin (OS units)
int first line to redraw (updated on return)
int last line to redraw (updated on return)
This call can be used in a UserRedraw FN to calculate
which text lines need to be redrawn when a redraw request
is received. Note that it is assumed that the lines of
text are equally spaced.
The first line is numbered 0.
Using this call can substantially reduce the amount of
time your application spends redrawing a window.
Example code:
DEF FN_UserRedraw_Mainw( blk%, x0%, y0% )
LOCAL top_line%, bottom_line%, top_margin%, line_spacing%
LOCAL line_ctr%, max_nr_lines%
top_margin% = 4
line_spacing% = 32
max_nr_lines% = 100
PROCshell_WindowUserRedrawGetLines( blk%, line_spacing, top_margin%, top_line%, bottom_line% )
line_ctr% = 0
REPEAT
IF line_ctr% >= top_line% AND line_ctr% <= bottom_line% THEN
REM perform text plotting here...
ENDIF
line_ctr% += 1
UNTIL line_ctr% = max_nr_lines% - 1
= 0
--------------------------------------------------------
PROCshell_WindowSetDefaultPosition()
=> str window template name
int xmin (OS coordinates)
int ymin (OS coordinates)
int xmax (OS coordinates)
int ymax (OS coordinates)
This call sets the position of a window on the screen
before it is opened. This is handy for programs that
store the last window position in an options file.
This call should be made before the window is
created from the template.
An error occurs if the window template name is not
in the template file.
--------------------------------------------------------